package com.rf.richfitwheel.workflow.conf;

public class WorkflowContants {

    //队列通知事件名称
    public final static String EVENTNAME_PROCESS_START = "processStart";//流程开始
    public final static String EVENTNAME_PROCESS_END = "processEnd";//流程正常结束
    public final static String EVENTNAME_PROCESS_TERMINATED = "processTerminated";//流程被终止
    public final static String EVENTNAME_TASK_CREATE = "taskCreate";//任务生成

    public final static String PROCESS_STATUS_0 = "0";//待审批
    public final static String PROCESS_STATUS_1 = "1";//审批中
    public final static String PROCESS_STATUS_2 = "2";//审批结束
    public final static String PROCESS_STATUS_3 = "3";//审批结束

    public final static String FOLDER_TYPE_1 = "1";//流程目录
    public final static String FOLDER_TYPE_2 = "2";//流程大类
    public final static String FOLDER_TYPE_3 = "3";//通用流程

    /**
     * 任务处理结果
     */
    public enum ProcessResult {
        /**
         * 初始状态
         */
        CREATE("0"),
        /**
         * 发起
         */
        START("1"),
        /**
         * 同意
         */
        AGREE("2"),
        /**
         * 不同意
         */
        DISAGREE("3"),
        /**
         * 退回
         */
        BACK("4"),
        /**
         * 撤回
         */
        RECALL("5"),
        /**
         * 终止
         */
        TERMINATE("6");

        private String value;

        ProcessResult(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 任务处理情况
     */
    public enum ProcessRecordState {
        /**
         * 处理中
         */
        PROCESSING("0"),
        /**
         * 已处理
         */
        PROCESSED("1");
        private String value;

        ProcessRecordState(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 流程处理结果
     */
    public enum ProcessInstanceState {
        /**
         * 运行中
         */
        RUN("1"),
        /**
         * 已结束
         */
        END("2"),
        /**
         * 终止
         */
        TERMINATED("3");
        private String value;

        ProcessInstanceState(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }
}
